'''
设置Cookie
'''
import requests
#没有登录登录的情况下，访问该接口，会跳转到登录页面
url = "https://www.bagevent.com/account/dashboard"
r = requests.get(url)
print(r.text)

#使用页面登录后，服务器返回的cookie信息，访问该接口，返回登录后的统计页面
hds = {
    "Cookie": '_ga=GA1.2.898728043.1615965992; _gid=GA1.2.872824269.1615965992; Hm_lvt_1fc37bec18db735c69ebe77d923b3ab9=1615965992; __auc=13ad1c891783f1445b1a072ed33; sdktoken=68edd18e335220d175f0bf64b259c6f5; uid=ef965a462d80fd4d62c3d118fe742e20; nickName=undefined; avatar=undefined; MEIQIA_TRACK_ID=1psK7g7yqqODa45WOXfKCti4C9P; BAGSESSIONID=02afdf9b-261c-4436-b259-4ddd02e0ca52; JSESSIONID=79B179498FBB86DE1EDDBB623F22A614; __asc=c76a6638178441def3c8c64462f; MEIQIA_VISIT_ID=1pv512xOjWnzNuo9ihmWU9LF9Pa; Hm_lpvt_1fc37bec18db735c69ebe77d923b3ab9=1616050526; _gat=1; BAG_EVENT_TOKEN_=02de735f68204d51009e7edda78e58c13a3fcdd1; BAG_EVENT_CK_KEY_="2780487875@qq.com"; BAG_EVENT_CK_TOKEN_=2440f5d17af838308ba4b390db81af38'
    }
r = requests.get(url,headers = hds)
print(r.text)

